import Router from '@koa/router';
import DepartmentController from '@/controllers/DepartmentController';
import auth from '@/middlewares/auth';

const router = new Router();

// 部门管理路由
router.get('/api/departments', auth, DepartmentController.list);
router.get('/api/departments/:id', auth, DepartmentController.get);
router.post('/api/departments', auth, DepartmentController.create);
router.put('/api/departments/:id', auth, DepartmentController.update);
router.delete('/api/departments/:id', auth, DepartmentController.delete);

export default router;

